package com.idanchuang.component.redis.util.pubsub;

import java.util.concurrent.Semaphore;

/**
 * @author yjy
 * Created at 2022/2/28 9:39 上午
 */
public class LockSemaphore extends Semaphore {

    private boolean alive;
    private String lockKey;

    public LockSemaphore(String lockKey, int permits) {
        super(permits);
        this.lockKey = lockKey;
        this.alive = false;
    }

    public boolean isAlive() {
        return alive;
    }

    public void setAlive(boolean alive) {
        this.alive = alive;
    }

    public String getLockKey() {
        return lockKey;
    }

    public void setLockKey(String lockKey) {
        this.lockKey = lockKey;
    }

}
